package dao

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Name string `gorm:"type:varchar(20);not null;comment:名称"`
	Pass string `gorm:"type:varchar(40);not null;comment:密码"`
}

type Place struct {
	gorm.Model
	Name    string `gorm:"type:varchar(50);not null;comment:名称"`
	Address string `gorm:"type:varchar(255);not null;comment:地址"`
	Open    string `gorm:"type:varchar(20);not null;comment:开门时间"`
	Price   int    `gorm:"type:int(11);not null;comment:价格"`
	Num     int    `gorm:"type:int(11);not null;comment:库存"`
}

type Vote struct {
	gorm.Model
	UserId    int    `gorm:"type:int(11);not null;comment:用户ID"`
	PlaceId   int    `gorm:"type:int(11);not null;comment:景区ID"`
	Times     string `gorm:"type:varchar(20);not null;comment:时间"`
	Insurance string `gorm:"type:varchar(20);not null;comment:保险"`
}

type Order struct {
	gorm.Model
	PlaceId int    `gorm:"type:int(11);not null;comment:景区ID"`
	Price   int    `gorm:"type:int(11);not null;comment:价格"`
	Times   string `gorm:"type:varchar(20);not null;comment:时间"`
	Num     int    `gorm:"type:int(11);not null;comment:库存"`
}
